<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:ic="http://ivyteam.ch/jsf/component"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title></title>
</h:head>

<h:body>
	<ui:composition
		template="../template/basicTemplate/basicTemplate.xhtml">
		<ui:define name="title">
       #{ivy.cms.co("/ch/ivy/demo/label/caption")}
    </ui:define>
		<ui:define name="center">
			<div class="center">
				<p:panel header="#{ivy.cms.co('/ch/ivy/demo/label/loginPage')}"
					id="panel">
					<!-- <p:messages id="msgs" autoUpdate="true" closable="true"/> -->
					<div id="formItems">

						<h:form id="loginForm">

							<h:outputLabel styleClass="red" value="#{data.messsage}"></h:outputLabel>
							<h:panelGrid id="grid" columns="2">
								<h:outputText
									value="#{ivy.cms.co('/ch/ivy/demo/label/username')}"
									for="txtUsername" />
								<p:inputText
									requiredMessage="#{ivy.cms.co('/ch/ivy/demo/error/required')}"
									required="true" id="txtUsername"
									value="#{data.userInfo.userName}" style="width:100px;">
								</p:inputText>
								<div></div>
								<p:message id="txtUsernameMessage" for="txtUsername" />

								<h:outputText
									value="#{ivy.cms.co('/ch/ivy/demo/label/password')}"
									for="txtPassword" />
								<p:password required="true" id="txtPassword"
									requiredMessage="#{ivy.cms.co('/ch/ivy/demo/error/required')}"
									value="#{data.userInfo.password}" style="width:100px;"></p:password>
								<div></div>
								<p:message id="txtPasswordMessage" for="txtPassword" />
							</h:panelGrid>
							<p:commandButton id="btnLogin" actionListener="#{logic.send}"
								value="#{ivy.cms.co('/ch/ivy/demo/label/login')}"
								update="loginForm"></p:commandButton>
							<p:commandButton id="btnClose" actionListener="#{logic.close}"
								value="#{ivy.cms.co('/ch/ivy/demo/label/close')}"
								immediate="true"></p:commandButton>
							<p:commandButton id="btnSignup" actionListener="#{logic.signup}"
								value="#{ivy.cms.co('/ch/ivy/demo/label/signup')}"
								process="@none"></p:commandButton>

						</h:form>
					</div>
				</p:panel>
			</div>
		</ui:define>
	</ui:composition>
</h:body>
</html>